package cn.ecut.dao.user;

import cn.ecut.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * @Author ruanxin
 */
public interface UserDao {
    //获取登录用户
    public User getLoginUser(Connection connection, String userCode) throws SQLException;

    //修改当前用户密码
    public int upateUserPassword(Connection connection, int id, String password) throws SQLException;

    //根据用户名和用户角色查询用户总数
    public int getUserCount(Connection connection, String userName, int userRole) throws SQLException;

    //根据用户名和用户角色查询用户
    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo,
                                  int pageSize) throws SQLException;
}
